<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link href="css/index.css" rel="stylesheet">
</head>
<body ng-controller="moduleController">
	<div id="content-header">
		<h1>权限</h1>
	</div>
	<div id="breadcrumb">
		<a href="#!/index" title="返回首页" class="current"><i
			class="icon-home"></i>权限</a>
	</div>
	<div class="widget-box">
		<div class="clearfix" style="width: 100%">
			<button class="btn btn-info btn" ng-click="addteacher()"
				style="float: left; margin-left: 5px;">新增</button>
		</div>
		<div class="widget-title">
			<h5>权限信息</h5>
		</div>
		<div class="widget-content nopadding">
			<table class="table table-bordered data-table">
				<thead>
					<tr>
						<th>序号</th>
						<th>权限名称</th>
						<th>权限路径</th>
						<th>创建时间</th>
						<th>简介</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody ng-show="addshow">
					<tr class="gradeA">
						<td width="5%"></td>
						<td width="11%"><input type="text" style="width: 100px"
							ng-model="newName"></td>
						<td width="11%"><input type="text" style="width: 100px"
							ng-model="newPath"></td>
						<td width="15%"></td>
						<td width="40%"><input type="text" style="width: 450px"
							ng-model="newInfo"></td>
						<td>
							<button class="btn btn-success btn-mini" ng-click="add()">添加</button>
							<button class="btn btn-info btn-mini" style="margin-left: 20%"
								ng-click="disadd()">取消</button>
						</td>
					</tr>
				</tbody>
				<tbody ng-repeat="data in datas">
					<tr class="gradeA">
						<td width="5%"><span ng-bind="$index+1"></span></td>
						<td width="11%"><span ng-bind="data.name" ng-hide="data.s"></span><input
							type="text" style="width: 100px" ng-model="data.namev"
							ng-show="data.s"></td>
						<td width="11%"><span ng-bind="data.path" ng-hide="data.s"></span><input
							type="text" style="width: 100px" ng-model="data.pathv"
							ng-show="data.s"></td>
						<td width="15%"><span ng-bind="data.createtime"
							ng-hide="data.s"></span></td>
						<td width="40%"><span ng-bind="data.info" ng-hide="data.s"></span><input
							type="text" style="width: 450px" ng-model="data.infov"
							ng-show="data.s"></td>

						<td>
							<button class="btn btn-success btn-mini"
								ng-click="toupdate(data)" ng-hide="data.u">修改</button>
							<button class="btn btn-success btn-mini" ng-click="update(data)"
								ng-show="data.u">保存</button>
							<button class="btn btn-info btn-mini" style="margin-left: 20%"
								ng-click="disupdate(data)" ng-show="data.u">取消</button>
							<button ng-hide="data.u" data-toggle="modal" data-target="#myModal1" ng-click="toDeletet(data)"
								style="margin-left: 20%" class="btn btn-danger btn-mini">删除</button>
						</td>
					</tr>
				</tbody>
			</table>
		</div>
	</div>
	<!-- 模态框（Modal） -->
	<div class="modal fade" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	    <div class="modal-dialog">
	        <div class="modal-content">
	            <div class="modal-header">
	                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
	                <h4 class="modal-title" id="myModalLabel">确认删除</h4>
	            </div>
	            <div class="modal-footer">
	            	<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
	                <button type="button" class="btn btn-primary" ng-click="deletet()" data-dismiss="modal" aria-hidden="true">确定</button>
	            </div>
	        </div><!-- /.modal-content -->
	    </div><!-- /.modal -->
	</div>
</body>
</html>